

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link media="all" href="../css/base.css" type="text/css" rel="stylesheet">
<link media="all" href="../css/index.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../css/heloo.img.cut.css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script src="../js/heloo.compress.img.js"></script>
<title>超级派单员-何乐而不为</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta content="" name="Keywords">
<meta content="" name="Description">
<!-- Mobile Devices Support @begin -->
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="format-detection" content="telephone=no, address=no">
<meta content="yes" name="apple-mobile-web-app-capable"> <!-- apple devices fullscreen -->
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style">
<!-- Mobile Devices Support @end -->
<link href="favourite.ico" rel="shortcut icon">
</head>
<body >

    <div class='upload_wrap'>
    	超级派单员前端图片压缩测试:<input id="head_img"  type="file" accept="image/*" />
    </div>


	
<script type="text/javascript">
   $(function(){
   
	$('#head_img').change(function(){ //点击上传按钮
		   var that = $(this);
		   var file = this.files[0]; //选择上传的文件
		   var r = new FileReader();
		   r.readAsDataURL(file); //Base64
		   $(r).load(function(){
			var src = this.result;
			cutAction({img:src,callback: function(data){
			    //这里的data就是图片数据，请开发人员对齐进行相关操作
				var $img = $('<img src="' + data + '"/>');
				$('body').empty();
				$('body').append($img);			
			}});
		   });
	});	   
	   
   });
</script>
</body>
</html>